minios: do not export {test,set,clear}_bit etc to applications
authorIan Campbell <ian.campbell@citrix.com>
Mon, 7 Feb 2011 12:13:24 +0000 (12:13 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 7 Feb 2011 12:13:24 +0000 (12:13 +0000)
Fixes ioemu stubdom build:
CC    i386-stubdom/piix4acpi.o
[...]/stubdom/ioemu/hw/piix4acpi.c:272: error: expected ')' before '?' token
[...]/stubdom/ioemu/hw/piix4acpi.c:277: error: conflicting types for 'set_bit'
[...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:396: error: previous definition of 'set_bit' was here
[...]/stubdom/ioemu/hw/piix4acpi.c:282: error: conflicting types for 'clear_bit'
[...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:414: error: previous definition of 'clear_bit' was here
[...]/stubdom/ioemu/hw/piix4acpi.c: In function 'gpe_sts_write':

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
extras/mini-os/include/x86/os.h

index 6bd0ebee99ad35279c4ef3e11d560df493762c9f..f193865cd2e416444d312a129cc1568cca328e4f 100644 (file)
@@ -164,6 +164,7 @@ typedef struct { volatile int counter; } atomic_t;
 
 
 /************************** i386 *******************************/
+#ifdef __INSIDE_MINIOS__
 #if defined (__i386__)
 
 #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr))))
@@ -451,7 +452,7 @@ static __inline__ unsigned long __ffs(unsigned long word)
 #else /* ifdef __x86_64__ */
 #error "Unsupported architecture"
 #endif
-
+#endif /* ifdef __INSIDE_MINIOS */
 
 /********************* common i386 and x86_64  ****************************/
 struct __synch_xchg_dummy { unsigned long a[100]; };